<?xml version="1.0"?>

<!--
     phpMeccano v0.2.0. Web-framework written with php programming language. Validation schema [logman-events-v01.rng].
     Copyright (C) 2015-2019  Alexei Muzarov
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.
 
     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
 
     You should have received a copy of the GNU General Public License along
     with this program; if not, write to the Free Software Foundation, Inc.,
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
     e-mail: azexmail@gmail.com
     e-mail: azexmail@mail.ru
     https://bitbucket.org/azexmail/phpmeccano
-->

<grammar datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" xmlns="http://relaxng.org/ns/structure/1.0" >
    <start>
        <element name="log">
            <attribute name="plugin">
                <data type="string">
                    <param name="pattern">[a-zA-Z0-9_]{3,30}</param>
                </data>
            </attribute>
            <zeroOrMore>
                <element name="event">
                    <attribute name="keyword">
                        <data type="string">
                            <param name="pattern">[a-zA-Z0-9_]{3,30}</param>
                        </data>
                    </attribute>
                    <oneOrMore>
                        <element name="desc">
                            <attribute name="code">
                                <data type="string">
                                    <param name="pattern">[a-z]{2}-[A-Z]{2}</param>
                                </data>
                            </attribute>
                            <data type="string">
                                <param name="maxLength">128</param>
                            </data>
                        </element>
                    </oneOrMore>
                </element>
            </zeroOrMore>
        </element>
    </start>
</grammar>
